import request from '@/utils/request';
import { AxiosPromise } from 'axios';

// 楼层库位树
export function locationTree(data: any) {
    return request({
        url: '/stock/stockLocation/locationTree',
        method: 'post',
        data
    });
}

// 列表
export function stockLocationList(data: any) {
    return request({
        url: '/stock/stockLocation/list',
        method: 'post',
        data
    });
}

// 新 - 列表
export function locationList(data: any) {
    return request({
        url: '/stock/stockLocation/getList',
        method: 'post',
        data
    });
}

//  新增楼层、库位码
export function stockLocationGenerate(data: any) {
    return request({
        url: '/stock/stockLocation/generate',
        method: 'post',
        data
    });
}

//  新 - 新增楼层、库位码
export function stockLocationAdd(data: any) {
    return request({
        url: '/stock/stockLocation/add',
        method: 'post',
        data
    });
}

//  启用
export function stockLocationEnable(data: any) {
    return request({
        url: '/stock/stockLocation/enable',
        method: 'post',
        data
    });
}

//  禁用
export function stockLocationDisable(data: any) {
    return request({
        url: '/stock/stockLocation/disable',
        method: 'post',
        data
    });
}

//  删除
export function stockLocationDel(data: any) {
    return request({
        url: '/stock/stockLocation/del',
        method: 'post',
        data
    });
}